/*
biopp_debug.h: Molecular Biology ++ Debugging Header file.
    Copyright (C) 2009  Daniel Gutson, FuDePAN

    This file is part of Biopp.

    Biopp is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Biopp is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Biopp.  If not, see <http://www.gnu.org/licenses/>.

    NOTE: This file is in prototype stage, and is under active development.
*/

#include <stl-debug/stl_debug_impl.h>

#ifdef STL_DEBUG_ENABLE
DECLARE_STL_TO_COUT(Nucleotide)
{
    switch (p)
    {
        case A:
            stl_print('A', false);
            break;
        case T:
            stl_print('T', false);
            break;
        case C:
            stl_print('C', false);
            break;
        case G:
            stl_print('G', false);
            break;
    }
}

DECLARE_STL_TO_COUT(Triplet)
{
    stl_print(p[0], false);
    stl_print(' ', false);
    stl_print(p[1], false);
    stl_print(' ', false);
    stl_print(p[2], false);
}

Triplet mktriplet(const char* t)
{
    return Triplet(t);
}

bool comptri(const char* t1, const char* t2)
{
    return Triplet(t1) < Triplet(t2);
}
#endif

STL_DEBUG_REGISTER_MAP(Triplet, Aminoacid)
STL_DEBUG_REGISTER_MULTIMAP(Aminoacid, Triplet)

